﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucVnHomeProducts.ascx.cs" Inherits="VINETLIFE.Module.ucVnHomeProducts" %>

<div class="t-products-inner">
    <ul class="tabs-procate" id="ulTab">
        <li><a href="javascript:void(0);" title='palls' class="tab active">Toàn bộ</a>
        </li>
        <li><a href="javascript:void(0);" title='pnews' class="tab">Sản phẩm mới</a>
        </li>
        <li><a href="javascript:void(0);" title='psales' class="tab">Sản phẩm khuyến mãi</a>
        </li>
        <li class="t-procate-dropdown">
            <div class="t-procate-dropdown">
                <span class="t-procate-dd-l">Sắp xếp</span>
                <span class="t-procate-dd-r">
                    <asp:DropDownList runat="server" ID="ddlSort" AutoPostBack="true" AppendDataBoundItems="true" OnSelectedIndexChanged="ddlSort_SelectedIndexChanged">
                        <asp:ListItem Value="" Text=" .: Mặc định :. "></asp:ListItem>
                        <asp:ListItem Value="prd" Text="Giá giảm dần"></asp:ListItem>
                        <asp:ListItem Value="pra" Text="Giá tăng dần"></asp:ListItem>
                        <asp:ListItem Value="prod" Text="Sản phẩm mới trước"></asp:ListItem>
                        <asp:ListItem Value="proa" Text="Sản phẩm cũ trước"></asp:ListItem>
                    </asp:DropDownList>
                </span>
            </div>
        </li>
    </ul>
</div>
<asp:UpdatePanel runat="server" ID="updateX">
    <ContentTemplate>
        <div id="palls" class="contents-pro">
            <div class="infox">
                <div class="t-products-inner">
                    <asp:Repeater runat="server" ID="rptHomeProducts" OnItemDataBound="rptHomeProducts_ItemDataBound">
                        <ItemTemplate>
                            <div class="t-product">
                                <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                    title='<%#Eval("ProductTitle") %>' class="t-product-link">
                                    <div class="t-product-img-wrap">
                                        <img alt='<%#Eval("ProductTitle")%>' title='<%#Eval("ProductTitle")%>' src='/Media/<%#Eval("ProductImage") %>' class="t-product-img" />
                                    </div>
                                    <div class="t-product-info">
                                        <h2><%#Eval("ProductTitle")%></h2>
                                        <div class="t-product-price-wrap">
                                            <div class="t-pwpp-nonprice-wrap-inner">
                                                <div class="t-product-price">
                                                    <span class="t-product-span-price"><%#VINETLIFE.Ultility.GetPrice(Eval("ProductId"))%></span>
                                                    <span class="t-pwmp-saleprice-m">
                                                        <%#VINETLIFE.Ultility.GetSalePriceNormal(Eval("IsPromotion"),Eval("Price"))%>
                                                    </span>
                                                </div>

                                            </div>
                                        </div>
                                        <div class="t-product-info-view">
                                        </div>
                                    </div>
                                    <div class="t-product-type">
                                        <asp:Label runat="server" ID="lblType"></asp:Label>
                                    </div>
                                    <div class="t-product-wrap-more">
                                        <div class="t-product-wrap-more-head">
                                            <div class="t-product-desc-wrap">
                                                <div class="t-product-desc">
                                                    <%#Eval("HomeDescription") %>
                                                </div>
                                            </div>
                                        </div>
                                        <asp:Panel runat="server" ID="pnlPromotion">
                                            <div class="t-product-wrap-more-promotion">
                                                <span class="t-pwmp-sale">Giảm<br />
                                                    <asp:Literal runat="server" ID="ltrSale"></asp:Literal></span>
                                                <div class="t-pwmp-price-wrap">
                                                    <div class="t-pwmp-sale-saleprice">
                                                        <span>Giá gốc </span><span style="text-decoration: line-through;"><%#VINETLIFE.Ultility.GetPriceNormal(Eval("Price"))%></span>
                                                    </div>
                                                    <span class="t-pwmp-sale-price"><span>Còn: </span><%#VINETLIFE.Ultility.GetPriceNormal(Eval("SalePrice"))%></span>
                                                    <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                                        title='<%#Eval("ProductTitle") %>' class="t-product-link-pro">Xem tiếp
                                                    </a>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                        <asp:Panel runat="server" ID="pnlNonPromotion" Visible="false">
                                            <div class="t-product-wrap-more-nonpromotion">
                                                <div class="t-pwmp-nonprice-wrap">

                                                    <span class="t-pwmp-price">Giá: </span><span class="t-pwmp-sale-price-x"><%#VINETLIFE.Ultility.GetPriceNormal(Eval("Price"))%></span>

                                                    <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                                        title='<%#Eval("ProductTitle") %>' class="t-product-link-pro-x">Xem tiếp
                                                    </a>
                                                </div>
                                            </div>
                                        </asp:Panel>
                                    </div>
                                </a>
                                <a href="#" class="t-product-info-next"></a>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                    <div class="loadmore-product">
                        <a href="/danh-muc-san-pham/" title="Xem toàn bộ sản phẩm" class="button-gg-green">Click để xem thêm</a>
                    </div>
                </div>
            </div>
        </div>
        <div id="pnews" class="contents-pro">
            <div class="infox">
                <div class="t-products-inner">
                    <div class="t-products-inner">
                        <asp:Repeater runat="server" ID="rptHomeNew" OnItemDataBound="rptHomeProducts_ItemDataBound">
                            <ItemTemplate>
                                <div class="t-product">
                                    <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                        title='<%#Eval("ProductTitle") %>' class="t-product-link">
                                        <div class="t-product-img-wrap">
                                            <img alt='<%#Eval("ProductTitle")%>' title='<%#Eval("ProductTitle")%>' src='/Media/<%#Eval("ProductImage") %>' class="t-product-img" />
                                        </div>
                                        <div class="t-product-info">
                                            <h2><%#Eval("ProductTitle")%></h2>
                                            <div class="t-product-price-wrap">
                                                <div class="t-pwpp-nonprice-wrap-inner">
                                                    <div class="t-product-price">
                                                        <span class="t-product-span-price"><%#VINETLIFE.Ultility.GetPrice(Eval("ProductId"))%></span>
                                                        <span class="t-pwmp-saleprice-m">
                                                            <%#VINETLIFE.Ultility.GetSalePriceNormal(Eval("IsPromotion"),Eval("Price"))%>
                                                        </span>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="t-product-info-view">
                                            </div>
                                        </div>
                                        <div class="t-product-type">
                                            <asp:Label runat="server" ID="lblType"></asp:Label>
                                        </div>
                                        <div class="t-product-wrap-more">
                                            <div class="t-product-wrap-more-head">
                                                <div class="t-product-desc-wrap">
                                                    <div class="t-product-desc">
                                                        <%#Eval("HomeDescription") %>
                                                    </div>
                                                </div>
                                            </div>
                                            <asp:Panel runat="server" ID="pnlPromotion">
                                                <div class="t-product-wrap-more-promotion">
                                                    <span class="t-pwmp-sale">Giảm<br />
                                                        <asp:Literal runat="server" ID="ltrSale"></asp:Literal></span>
                                                    <div class="t-pwmp-price-wrap">
                                                        <div class="t-pwmp-sale-saleprice">
                                                            <span>Giá gốc </span><span style="text-decoration: line-through;"><%#VINETLIFE.Ultility.GetPriceNormal(Eval("Price"))%></span>
                                                        </div>
                                                        <span class="t-pwmp-sale-price"><span>Còn: </span><%#VINETLIFE.Ultility.GetPriceNormal(Eval("SalePrice"))%></span>
                                                        <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                                            title='<%#Eval("ProductTitle") %>' class="t-product-link-pro">Xem tiếp
                                                        </a>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <asp:Panel runat="server" ID="pnlNonPromotion" Visible="false">
                                                <div class="t-product-wrap-more-nonpromotion">
                                                    <div class="t-pwmp-nonprice-wrap">

                                                        <span class="t-pwmp-price">Giá: </span><span class="t-pwmp-sale-price-x"><%#VINETLIFE.Ultility.GetPriceNormal(Eval("Price"))%></span>

                                                        <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                                            title='<%#Eval("ProductTitle") %>' class="t-product-link-pro-x">Xem tiếp
                                                        </a>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    </a>
                                    <a href="#" class="t-product-info-next"></a>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                         <div class="loadmore-product">
                        <a href="/san-pham-moi/" title="Xem toàn bộ sản phẩm" class="button-gg-green">Click để xem thêm</a>
                    </div>
                    </div>
                </div>
            </div>
        </div>
        <div id="psales" class="contents-pro">
            <div class="infox">
                <div class="t-products-inner">
                    <div class="t-products-inner">
                        <asp:Repeater runat="server" ID="rptHomePromotion" OnItemDataBound="rptHomeProducts_ItemDataBound">
                            <ItemTemplate>
                                <div class="t-product">
                                    <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                        title='<%#Eval("ProductTitle") %>' class="t-product-link">
                                        <div class="t-product-img-wrap">
                                            <img alt='<%#Eval("ProductTitle")%>' title='<%#Eval("ProductTitle")%>' src='/Media/<%#Eval("ProductImage") %>' class="t-product-img" />
                                        </div>
                                        <div class="t-product-info">
                                            <h2><%#Eval("ProductTitle")%></h2>
                                            <div class="t-product-price-wrap">
                                                <div class="t-pwpp-nonprice-wrap-inner">
                                                    <div class="t-product-price">
                                                        <span class="t-product-span-price"><%#VINETLIFE.Ultility.GetPrice(Eval("ProductId"))%></span>
                                                        <span class="t-pwmp-saleprice-m">
                                                            <%#VINETLIFE.Ultility.GetSalePriceNormal(Eval("IsPromotion"),Eval("Price"))%>
                                                        </span>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="t-product-info-view">
                                            </div>
                                        </div>
                                        <div class="t-product-type">
                                            <asp:Label runat="server" ID="lblType"></asp:Label>
                                        </div>
                                        <div class="t-product-wrap-more">
                                            <div class="t-product-wrap-more-head">
                                                <div class="t-product-desc-wrap">
                                                    <div class="t-product-desc">
                                                        <%#Eval("HomeDescription") %>
                                                    </div>
                                                </div>
                                            </div>
                                            <asp:Panel runat="server" ID="pnlPromotion">
                                                <div class="t-product-wrap-more-promotion">
                                                    <span class="t-pwmp-sale">Giảm<br />
                                                        <asp:Literal runat="server" ID="ltrSale"></asp:Literal></span>
                                                    <div class="t-pwmp-price-wrap">
                                                        <div class="t-pwmp-sale-saleprice">
                                                            <span>Giá gốc </span><span style="text-decoration: line-through;"><%#VINETLIFE.Ultility.GetPriceNormal(Eval("Price"))%></span>
                                                        </div>
                                                        <span class="t-pwmp-sale-price"><span>Còn: </span><%#VINETLIFE.Ultility.GetPriceNormal(Eval("SalePrice"))%></span>
                                                        <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                                            title='<%#Eval("ProductTitle") %>' class="t-product-link-pro">Xem tiếp
                                                        </a>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                            <asp:Panel runat="server" ID="pnlNonPromotion" Visible="false">
                                                <div class="t-product-wrap-more-nonpromotion">
                                                    <div class="t-pwmp-nonprice-wrap">

                                                        <span class="t-pwmp-price">Giá: </span><span class="t-pwmp-sale-price-x"><%#VINETLIFE.Ultility.GetPriceNormal(Eval("Price"))%></span>

                                                        <a href='/san-pham/<%#FriendlyUrl(Eval("ProductTitle").ToString())%>-<%#Eval("ProductID")%>'
                                                            title='<%#Eval("ProductTitle") %>' class="t-product-link-pro-x">Xem tiếp
                                                        </a>
                                                    </div>
                                                </div>
                                            </asp:Panel>
                                        </div>
                                    </a>
                                    <a href="#" class="t-product-info-next"></a>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                </div>
            </div>
        </div>

    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="ddlSort" EventName="SelectedIndexChanged" />
    </Triggers>
</asp:UpdatePanel>
